<template>
  <div>
    <h2>这是子组件</h2>
    <p>这个是子组件中aa和bb:{{ aa }}---{{ bb }}</p>
    <button @click="add">按我加-{{ value }}</button>
  </div>

</template>

<script>
export default {
  props: {
    /*     value: {
      type: Number,
      required: true
    } */
    aa: {
      type: Number,
      required: true
    },
    bb: {
      type: Number,
      required: true
    }
  },
  methods: {
    /*     add() {
      this.$emit('addNum')
    } */
    add() {
      this.$emit('update:aa', this.aa + 1)
      this.$emit('update:bb', this.bb + 1)
    }
  }
}
</script>

<style>

</style>
